/*
 * @Description:
 * @Version: 1.0
 * @Autor: chen_yt
 * @Date: 2021-11-23 09:16:23
 * @LastEditors: chen_yt
 * @LastEditTime: 2021-11-23 09:44:18
 */

/**
* @description: 利用a标签将相对路径转为绝对路径
*/
export function transRelativeToAbsolute (propUrl) {
  var a = document.createElement('a')
  a.href = propUrl
  let url = a.href
  url = url.replace('http', 'ws')
  return url
}